tsvExport
Type
command
Summary
Converts a data array into a delimiter separated string
Syntax
tsvExport <pArray>,<pOptions>,<rText>
Description
This command takes in an array, converts it into a delimiter separated text based on optional parameters and returns it as a text string.
When specifying the quoting-rule for TSV export, consider the following options:
- "all": Quotes all fields for consistency.
- "minimal": Quotes fields with special characters to ensure data integrity.
- "none": Does not quote any fields, potentially increasing readability but may cause issues with special characters.
Parameters
Name | Type | Description |
---|---|---|
pArray | Input nested data array with format
| |
pOptions | An array of options to use when handling tsv. The keys are as follows:
| |
rText | Returns a delimiter separated text form of the input data array |
Examples
local tArray
put { \
"headers":["ID","Name"], \
"data": [ \
["1","John"], \
["2","Doe"] \
] \
} \
into tArray
local tOptions
put { "has-header-row": true } into tOptions
local tText
tsvExport \
tArray, \
tOptions, \
tText